package com.zzxy.spring.controller;

import com.mysql.cj.result.DefaultValueFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@RequestMapping("/test")
@Controller
public class TestController {
    @RequestMapping("test1")
    public String test1(@RequestParam(required = true, defaultValue = "10", name = "id") int id ){
        System.out.println("id: " + id);
        return "forward:/stu/register.do";
    }
    @RequestMapping("test2")
    public String test2() {
        return "forward:/stu/register.do";
    }
}
